projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05e243a
)
tools/xenstored: Don't leak a file handle when creating the pidfile
author
Andrew Cooper
<andrew.cooper3@citrix.com>
Mon, 25 Nov 2013 11:07:44 +0000
(11:07 +0000)
committer
Ian Jackson
<Ian.Jackson@eu.citrix.com>
Mon, 25 Nov 2013 12:28:41 +0000
(12:28 +0000)
Coverity ID:
1055849
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xenstore/xenstored_posix.c
patch
|
blob
|
history
diff --git
a/tools/xenstore/xenstored_posix.c
b/tools/xenstore/xenstored_posix.c
index 25bdf7471696b2d2621788dffb281929ee569891..0c93e6d688ca23cbf054a34e2dbfa2978cb360f9 100644
(file)
--- a/
tools/xenstore/xenstored_posix.c
+++ b/
tools/xenstore/xenstored_posix.c
@@
-44,6
+44,8
@@
void write_pidfile(const char *pidfile)
len = snprintf(buf, sizeof(buf), "%ld\n", (long)getpid());
if (write(fd, buf, len) != len)
barf_perror("Writing pid file %s", pidfile);
+
+ close(fd);
}
/* Stevens. */